.class public Les/f80;
.super Ljava/lang/Object;
.source "OutArchive.java"


# instance fields
.field protected a:Ljava/lang/String;

.field protected b:Les/l80;

.field protected c:J

.field private d:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Ljava/lang/String;Les/l80;Ljava/util/Map;)V
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Les/l80;",
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;)V"
        }
    .end annotation

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const-wide/16 v0, 0x0

    .line 2
    iput-wide v0, p0, Les/f80;->c:J

    .line 3
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Les/f80;->d:Ljava/util/Map;

    .line 4
    iput-object p1, p0, Les/f80;->a:Ljava/lang/String;

    if-nez p2, :cond_0

    .line 5
    sget-object p1, Les/l80;->a:Les/l80;

    iput-object p1, p0, Les/f80;->b:Les/l80;

    goto :goto_0

    .line 6
    :cond_0
    iput-object p2, p0, Les/f80;->b:Les/l80;

    :goto_0
    if-eqz p3, :cond_1

    .line 7
    iput-object p3, p0, Les/f80;->d:Ljava/util/Map;

    :cond_1
    return-void
.end method


# virtual methods
.method public a()Ljava/lang/String;
    .locals 1

    .line 1
    iget-object v0, p0, Les/f80;->a:Ljava/lang/String;

    return-object v0
.end method

.method protected a(Ljava/io/File;Ljava/lang/String;Les/b80;)V
    .locals 7
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/estrongs/fs/FileSystemException;
        }
    .end annotation

    .line 40
    invoke-virtual {p1}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/estrongs/fs/impl/local/f;->c(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    return-void

    .line 41
    :cond_0
    iget-object v0, p0, Les/f80;->b:Les/l80;

    invoke-interface {v0}, Les/j80;->a()Z

    move-result v0

    if-eqz v0, :cond_1

    return-void

    :cond_1
    const-string v0, "/"

    if-eqz p2, :cond_3

    .line 42
    invoke-virtual {p2}, Ljava/lang/String;->length()I

    move-result v1

    const/4 v2, 0x1

    if-ge v1, v2, :cond_2

    goto :goto_0

    .line 43
    :cond_2
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    goto :goto_1

    .line 44
    :cond_3
    :goto_0
    invoke-virtual {p1}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object p2

    .line 45
    :goto_1
    invoke-virtual {p1}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lcom/estrongs/fs/impl/local/f;->i(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_4

    .line 46
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-interface {p3, v0}, Les/b80;->a(Ljava/lang/String;)V

    .line 47
    invoke-virtual {p1}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object p1

    sget-object v0, Lcom/estrongs/fs/h;->a:Lcom/estrongs/fs/h;

    invoke-static {p1, v0}, Lcom/estrongs/fs/impl/local/f;->a(Ljava/lang/String;Lcom/estrongs/fs/h;)Ljava/util/List;

    move-result-object p1

    .line 48
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_2
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_7

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/estrongs/fs/g;

    .line 49
    new-instance v1, Ljava/io/File;

    invoke-interface {v0}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0, v1, p2, p3}, Les/f80;->a(Ljava/io/File;Ljava/lang/String;Les/b80;)V

    goto :goto_2

    .line 50
    :cond_4
    iget-object v0, p0, Les/f80;->b:Les/l80;

    invoke-virtual {p1}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v1

    .line 51
    invoke-virtual {p1}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Lcom/estrongs/fs/impl/local/f;->e(Ljava/lang/String;)J

    move-result-wide v2

    .line 52
    invoke-interface {v0, v1, v2, v3}, Les/l80;->a(Ljava/lang/String;J)V

    .line 53
    invoke-interface {p3, p2}, Les/b80;->a(Ljava/lang/String;)V

    const/high16 p2, 0x100000

    new-array v0, p2, [B

    const/4 v1, 0x0

    .line 54
    :try_start_0
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v2

    invoke-virtual {p1}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object p1

    .line 55
    invoke-static {v2, p1}, Lcom/estrongs/fs/impl/local/f;->b(Landroid/content/Context;Ljava/lang/String;)Ljava/io/InputStream;

    move-result-object p1

    .line 56
    new-instance v2, Ljava/io/BufferedInputStream;

    invoke-direct {v2, p1, p2}, Ljava/io/BufferedInputStream;-><init>(Ljava/io/InputStream;I)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    :goto_3
    const/4 p1, 0x0

    .line 57
    :try_start_1
    invoke-virtual {v2, v0, p1, p2}, Ljava/io/InputStream;->read([BII)I

    move-result v1

    const/4 v3, -0x1

    if-eq v1, v3, :cond_6

    .line 58
    iget-object v3, p0, Les/f80;->b:Les/l80;

    invoke-interface {v3}, Les/j80;->a()Z

    move-result v3

    if-eqz v3, :cond_5

    goto :goto_4

    .line 59
    :cond_5
    invoke-interface {p3, v0, p1, v1}, Les/b80;->write([BII)V

    .line 60
    iget-wide v3, p0, Les/f80;->c:J

    int-to-long v5, v1

    add-long/2addr v3, v5

    iput-wide v3, p0, Les/f80;->c:J

    .line 61
    iget-object p1, p0, Les/f80;->b:Les/l80;

    invoke-interface {p1, v3, v4}, Les/l80;->a(J)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_3

    .line 62
    :cond_6
    :goto_4
    invoke-virtual {v2}, Ljava/io/InputStream;->close()V

    .line 63
    invoke-interface {p3}, Les/b80;->a()V

    :cond_7
    return-void

    :catchall_0
    move-exception p1

    move-object v1, v2

    goto :goto_5

    :catchall_1
    move-exception p1

    :goto_5
    if-eqz v1, :cond_8

    .line 64
    invoke-virtual {v1}, Ljava/io/InputStream;->close()V

    .line 65
    :cond_8
    invoke-interface {p3}, Les/b80;->a()V

    .line 66
    goto :goto_7

    :goto_6
    throw p1

    :goto_7
    goto :goto_6
.end method

.method public a(Ljava/util/List;)V
    .locals 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;)V"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/estrongs/fs/FileSystemException;
        }
    .end annotation

    const-wide/16 v0, 0x0

    .line 2
    iput-wide v0, p0, Les/f80;->c:J

    .line 3
    new-instance v0, Ljava/io/File;

    invoke-virtual {p0}, Les/f80;->a()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 4
    invoke-virtual {v0}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v1

    invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lcom/estrongs/fs/impl/local/f;->c(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_1

    .line 5
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v1

    if-eqz v1, :cond_0

    .line 6
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v1

    invoke-virtual {v0}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v0

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Lcom/estrongs/fs/f;->o(Ljava/lang/String;)Z

    goto :goto_0

    .line 7
    :cond_0
    invoke-virtual {v0}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v0

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/estrongs/fs/impl/local/f;->l(Ljava/lang/String;)Z

    .line 8
    :cond_1
    :goto_0
    new-instance v0, Les/d80;

    iget-object v1, p0, Les/f80;->b:Les/l80;

    invoke-direct {v0, v1}, Les/d80;-><init>(Les/l80;)V

    .line 9
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :goto_1
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_2

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    .line 10
    new-instance v3, Ljava/io/File;

    invoke-direct {v3, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v3}, Les/d80;->a(Ljava/io/File;)V

    goto :goto_1

    .line 11
    :cond_2
    iget-object v1, p0, Les/f80;->b:Les/l80;

    invoke-interface {v1}, Les/j80;->a()Z

    move-result v1

    if-eqz v1, :cond_3

    return-void

    .line 12
    :cond_3
    iget-object v1, p0, Les/f80;->b:Les/l80;

    new-instance v2, Ljava/io/File;

    iget-object v3, p0, Les/f80;->a:Ljava/lang/String;

    invoke-direct {v2, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0}, Les/d80;->c()J

    move-result-wide v3

    .line 13
    invoke-virtual {v0}, Les/d80;->a()I

    move-result v5

    invoke-virtual {v0}, Les/d80;->b()I

    move-result v0

    add-int/2addr v5, v0

    .line 14
    invoke-interface {v1, v2, v3, v4, v5}, Les/l80;->a(Ljava/lang/String;JI)V

    .line 15
    iget-object v0, p0, Les/f80;->a:Ljava/lang/String;

    invoke-static {v0}, Les/c80;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 16
    iget-object v1, p0, Les/f80;->d:Ljava/util/Map;

    const-string v2, "archive_type"

    invoke-interface {v1, v2, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 17
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v1, p0, Les/f80;->a:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v1, ".tmp"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 18
    iget-object v1, p0, Les/f80;->d:Ljava/util/Map;

    invoke-static {v0, v1}, Les/z70;->a(Ljava/lang/String;Ljava/util/Map;)Les/b80;

    move-result-object v1

    .line 19
    :try_start_0
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_2
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_4

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    .line 20
    new-instance v3, Ljava/io/File;

    invoke-direct {v3, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    const-string v2, ""

    invoke-virtual {p0, v3, v2, v1}, Les/f80;->a(Ljava/io/File;Ljava/lang/String;Les/b80;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_2

    .line 21
    :cond_4
    invoke-interface {v1}, Les/b80;->close()V

    .line 22
    new-instance p1, Ljava/io/File;

    invoke-direct {p1, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 23
    iget-object v0, p0, Les/f80;->b:Les/l80;

    invoke-interface {v0}, Les/j80;->a()Z

    move-result v0

    if-nez v0, :cond_6

    .line 24
    iget-object v0, p0, Les/f80;->a:Ljava/lang/String;

    invoke-static {v0}, Lcom/estrongs/fs/impl/local/f;->c(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_5

    .line 25
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v0

    iget-object v1, p0, Les/f80;->a:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/estrongs/fs/f;->b(Ljava/lang/String;)Z

    .line 26
    :cond_5
    invoke-virtual {p1}, Ljava/io/File;->exists()Z

    move-result v0

    if-eqz v0, :cond_7

    .line 27
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v0

    .line 28
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v1

    invoke-virtual {p1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v1, p1}, Lcom/estrongs/fs/f;->g(Ljava/lang/String;)Lcom/estrongs/fs/g;

    move-result-object p1

    iget-object v1, p0, Les/f80;->a:Ljava/lang/String;

    .line 29
    invoke-virtual {v0, p1, v1}, Lcom/estrongs/fs/f;->a(Lcom/estrongs/fs/g;Ljava/lang/String;)Z

    goto :goto_3

    .line 30
    :cond_6
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v0

    invoke-virtual {p1}, Ljava/io/File;->getCanonicalPath()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v0, p1}, Lcom/estrongs/fs/f;->b(Ljava/lang/String;)Z

    :cond_7
    :goto_3
    return-void

    :catchall_0
    move-exception p1

    .line 31
    :try_start_1
    invoke-virtual {p1}, Ljava/lang/Throwable;->printStackTrace()V

    .line 32
    instance-of v2, p1, Ljava/io/IOException;

    if-eqz v2, :cond_8

    .line 33
    check-cast p1, Ljava/io/IOException;

    throw p1

    .line 34
    :cond_8
    new-instance v2, Ljava/io/IOException;

    invoke-virtual {p1}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;

    move-result-object p1

    invoke-direct {v2, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw v2
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    :catchall_1
    move-exception p1

    .line 35
    invoke-interface {v1}, Les/b80;->close()V

    .line 36
    new-instance v1, Ljava/io/File;

    invoke-direct {v1, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 37
    iget-object v0, p0, Les/f80;->b:Les/l80;

    invoke-interface {v0}, Les/j80;->a()Z

    move-result v0

    .line 38
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v0

    invoke-virtual {v1}, Ljava/io/File;->getCanonicalPath()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/estrongs/fs/f;->b(Ljava/lang/String;)Z

    .line 39
    goto :goto_5

    :goto_4
    throw p1

    :goto_5
    goto :goto_4
.end method
